import React, {Component} from 'react';

export default class SvgIcon extends Component {

    render() {
        const {
            color = 'currentColor',
            size,
            style,
            viewBox,
            children,
            ...other
        } = this.props;

        return (
            <svg
                {...other}
                style={Object.assign({
                    fill: color,
                    color,
                    width: size,
                    height: size,
                    userSelect: 'none',
                }, style)}
                viewBox={viewBox}
            >
                {children}
            </svg>
        );
    }
}

SvgIcon.defaultProps = {
    size: '.36rem',
    viewBox: '0 0 1024 1024'
};
